//
//  GJLocationUtil.h
//  xmgjAppFront
//
//  Created by Zeki on 2020/7/9.
//  Copyright © 2020 guojutech. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MAMapKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN

@interface GJLocationUtil : NSObject

+ (instancetype)shareInstance;

/// 定位
/// @param locationCompleteBlock 回调
- (void)getLocationWithCommplete:(void(^)(CLLocationCoordinate2D coordinate,NSDictionary *addressDic,NSError *error))locationCompleteBlock;


/// 停止更新定位
- (void)stopSerialLocation;


///逆地理编码
/// @param addressDic 地址参数
/// @param commpleteBlock 逆地理编码数组
- (void)geocodeSearch:(NSDictionary *)addressDic commplete:(void(^)(NSArray *resultArray))commpleteBlock;

/// 通过关键字查找POI
/// @param keywords 关键词
/// @param city 城市
/// @param completeBlock 返回数据
- (void)searchPOIWithKeyWords:(NSString *)keywords city:(NSString *)city complete:(void(^)(NSArray *resultArray))completeBlock;

/// 坐标搜索POI
/// @param coordinate 经纬度
/// @param completeBlock 返回数据
- (void)searchPOIWithCoordinate:(CLLocationCoordinate2D)coordinate city:(NSString *)city complete:(void(^)(NSArray *resultArray))completeBlock;

/// 自动缩放到显示所有的标记点
/// @param mapView mapView
/// @param animated animated
- (void)zoomMapViewToFitAnnotations:(MAMapView *)mapView animated:(BOOL)animated;
@end

NS_ASSUME_NONNULL_END
